


export default {
    namespaced: true,
    state: {
        BASE_URL: '',
        exptInfo: null,
        treeHeight: 0,
        pointArr: [],
        viewer: null,
        nowTime: "2022-12-12 12:00:00",
        startTime: "2022-12-12 12:00:00",
        task: {},
        position: null,
        numbers: localStorage.getItem('num') || 0,
        name: "",
        flag: localStorage.getItem('flag') || false,
        currentTask: {},
        nextTask: {},
        ldgd: "0",
        jl: "0",
        gps: "50",
        dy: 80,
        xh: 20,
        zjl: 0,
        scxh: 0,

        xzxh: 80,
        wxnum: 20,
        tlzt: '未知',
        fxms: '未知',
        zpzt: "未知",
        rptzt: "未知",
        rptnum: "20",
        target: {},
        FS: {},
        BZ: {}

    },
    getters: {},
    mutations: {
        setFlag(state, url) {
            state.flag = url
            localStorage.setItem('flag', url)

        },
        setNum(state, url) {
            state.numbers = url
            localStorage.setItem('num', url)

        },
        SETBASE_URL(state, url) {
            state.BASE_URL = url
            localStorage.setItem('BASE_URL', url)
        },
        SETEXPTINFO(state, data) {
            state.exptInfo = data
        },
        setPointArr(state, data) {
            state.pointArr = data
        },
        setViewer(state, data) {
            state.viewer = data
        },
        setNowTime(state, data) {
            state.nowTime = data
            state.startTime = data
            localStorage.setItem('nowTime', data)
            if (state.flag) localStorage.setItem('startTime', data)
        },
        setTask(state, data) {
            state.task = data
        },
        setPosition(state, data) {
            // console.log(data);
            state.position = data
            state.nowTime = data.nowTime
            state.currentTask = data.currentTask
            state.nextTask = data.nextTask
            state.ldgd = data.ldgd
            state.jl = data.jl
            state.zjl = data.zjl
        },
        setTarget(state, data) {
            // console.log(data);
            state.target = data

        },
        setFs(state, data) {
            // console.log(data);
            state.FS = data
        },
        setBZ(state, data) {
            // console.log(data);
            state.BZ = data
        },

    },
    actions: {



    }
}